package com.sunplus.system.registration.utils;

/**
 * @author zhouyangbin
 */
public class MouldCodeUtil {

    /**
     * ndjm	内地居民
     * xgjm	香港居民
     * amjm	澳门居民
     * twjm	台湾居民
     * hwhq	海外华侨
     * wgjm	外国居民
     *
     * @param identityCode
     * @return
     */
    public static String getMarriageCode(String identityCode){
        String mouldCode = null;
        if (identityCode.contains("ndjm")) {
            if (identityCode.contains("xgjm")) {
                mouldCode = "0003";
            } else if (identityCode.contains("amjm")) {
                mouldCode = "0004";
            } else if (identityCode.contains("twjm")) {
                mouldCode = "0005";
            } else if (identityCode.contains("hwhq")) {
                mouldCode = "0002";
            } else {
                mouldCode = "0006";
            }
        } else if (identityCode.contains("wgjm")) {
            mouldCode = "0007";
        } else {
            mouldCode = "0008";
        }
        return mouldCode;
    }
    public static String getAdoptionCode(String identityCode){
        String mouldCode = null;
        if (identityCode.contains("xgjm")) {
            mouldCode = "0011";
        } else if (identityCode.contains("amjm")) {
            mouldCode = "0012";
        } else if (identityCode.contains("twjm")) {
            mouldCode = "0013";
        } else if (identityCode.contains("hwhq")) {
            mouldCode = "0010";
        } else {
            mouldCode = "0009";
        }
        return mouldCode;
    }
}
